﻿
[DisplayName("评论管理模块")]
public class Comment : EntityBase
{
    [Required]
    [Key]
    [MaxLength(50)]
    [DisplayName("评论ID")]
    public string CommentId { get; set; }

    [Required]
    [MaxLength(50)]
    [DisplayName("视频ID")]
    public string VideoId { get; set; }

    [Required]
    [DisplayName("用户ID")]
    public string UserId { get; set; }

    [MaxLength(100)]
    [DisplayName("用户名称")]
    public string UserName { get; set; }

    [MaxLength(255)]
    [DisplayName("用户图像")]
    public string UserAvatar { get; set; }

    [Required]
    [MaxLength(1000)]
    [DisplayName("评论内容")]
    public string Content { get; set; }


    public int Likes { get; set; } = 0;

    [MaxLength(50)]
    [DisplayName("回复评论ID")]
    public string ReplyToCommentId { get; set; }

    [Required]
    [DisplayName("评论状态")]
    public CommentStatus Status { get; set; } = CommentStatus.Normal;

    // 导航属性
    public virtual Video Video { get; set; }
}

public enum CommentStatus
{
    Normal = 1,
    Deleted = 0,
    Flagged = 2,
    Hidden = 3
}
